package com.rm.zeyou.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.rm.zeyou.entity.User;
import com.rm.zeyou.entity.UserItemOrder;
import com.rm.zeyou.response.ApiRestResponse;
import com.rm.zeyou.vo.request.*;
import com.rm.zeyou.vo.response.*;

import java.io.IOException;
import java.text.ParseException;

/**
 * <p>
 * 用户订单表 服务类
 * </p>
 *
 * @author YanYang
 * @since 2025-03-12 15:55:09
 */
public interface UserItemOrderService extends IService<UserItemOrder> {
    ApiRestResponse<CreateOrderResponseVo> createOrderDetail(Long userId, CreateOrderVo createOrderVo) throws ParseException;

    ApiRestResponse createOrder(User user, CreateOrderVo createOrderVo) throws Exception;

    ApiRestResponse payOrder(PayOrderRequestVo requestVo) throws Exception;
    void updateOrder(String orderNo, String payType) throws Exception;
    void payVip(Long userId,Integer memberType,Integer ffectDay);


    ApiRestResponse cancelOrder(User user, String orderNo) throws Exception;

    ApiRestResponse userCancelOrder(User user, String orderNo) throws Exception;
    ApiRestResponse<PageInfo<SelectUserItemOrderListResponseVo>> selectUserItemOrderList(Long userId, SelectUserItemOrderListVo requestVo);

    ApiRestResponse<SelectUserItemOrderDetailResponseVo> selectUserItemOrderDetail(Long userId, String orderNo);

    ApiRestResponse<CreateOrderResponseVo> replaceTechnicianCreateOrderDetail(Long id, CreateOrderVo createOrderVo) throws ParseException;

    ApiRestResponse replaceTechnicianCreateOrder(User user, CreateOrderVo createOrderVo) throws Exception;

    ApiRestResponse<Integer> confirmOrder(Long userId, ConfirmOrderVo confirmOrderVo) throws Exception;
    Integer userConfirmOrder(UserItemOrder userItemOrder) throws Exception;

    ApiRestResponse<Integer> userAppraiseOrder(Long userId, UserAppraiseOrderVo appraiseVo);

    ApiRestResponse<Integer> userDeleteOrder(UserDeleteOrderVo deleteVo);

    ApiRestResponse<UserUpgradeOrderDetailResponseVo> userUpgradeOrderDetail(Long userId,UserUpgradeOrderDetailVo upgradeOrderDetailVo);

    ApiRestResponse userUpgradeOrder(User user, UserUpgradeOrderVo upgradeOrderVo) throws Exception;

    ApiRestResponse upgradePayOrder(PayOrderRequestVo requestVo) throws Exception;

    ApiRestResponse<UserBellOrderDetailResponseVo> userBellOrderDetail(Long userId, UserBellOrderDetailVo userBellOrderDetailVo);

    ApiRestResponse userBellOrder(User user, UserBellOrderVo userBellOrderVo) throws Exception;

    ApiRestResponse bellPayOrder(PayOrderRequestVo requestVo) throws Exception;

    void closeOrder();

    void closeNotPayOrderStatus();

    ApiRestResponse userUpgradeOrderCancelPay(String orderNo);

    ApiRestResponse bellOrderCancelPay(String orderNo);


    void voiceTechnicianToTakeOrder() throws Exception;

    void voiceTechnicianToEnd() throws Exception;

    Integer sumOrderTotalServiceTime(String orderNo);

    void upgradeUpdateOrder(String orderNo, String payType);

    void bellUpdateOrder(String orderNo, String payType);

    void technicianOrderException() throws IOException, InterruptedException;


}
